import Vue from "vue";
import VueRouter from "vue-router";
import Home from "../views/Home.vue";

Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    name: "Home",
    meta: {
      title: "首页"
    },
    component: Home
  },
  {
    path: "/about",
    name: "About",
    meta: {
      title: "关于我们"
    },
    component: () =>
      import(/* webpackChunkName: "about" */ "../views/About.vue")
  },
  {
    path: "/caselist",
    name: "caseList",
    meta: {
      title: "项目案例"
    },
    component: () => import("../views/caseList.vue")
  },
  {
    path: "/caselistdetail/:id",
    name: "caseListDetail",
    meta: {
      title: "案例详情"
    },
    component: () => import("../views/caseListDetail.vue")
  },
  {
    path: "/joinus",
    name: "joinUs",
    meta: {
      title: "加入我们"
    },
    component: () => import("../views/joinUs.vue")
  },
  {
    path: "/contactus",
    name: "contactUs",
    meta: {
      title: "联系我们"
    },
    component: () => import("../views/contactUs.vue")
  },

];

const router = new VueRouter({
  routes
});

export default router;
